<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>课程表</title>
 <script src="./js/jquery.min.js"></script>
 <script src="./js/bootstrap.min.js"></script>
 <link rel="stylesheet" href="css/bootstrap.min.css">
 <link rel="stylesheet" href="css/notices.css">
</head>
<body>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
  <tr style="background:#f7f6f6;">
    <td width="8%" style="background:#f7f6f6;"><div align="center"></div></td>
    <td width="12%"><div align="center">周一</div></td>
    <td width="12%"><div align="center">周二</div></td>
    <td width="12%"><div align="center">周三</div></td>
    <td width="12%"><div align="center">周四</div></td>
    <td width="12%"><div align="center">周五</div></td>
    <td width="12%"><div align="center">周六</div></td>
    <td width="12%"><div align="center">周日</div></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">1</div></td>
    <td rowspan="2"  style="background:#92e0aa; color:#fff;"><div align="center" id="table_1_1"></div><input id="table_1_1_0" type="hidden"/></td>
    <td rowspan="2" style="background:#ed9ea1; color:#fff;"><div align="center" id="table_2_1"></div><input id="table_2_1_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_3_1"></div><input id="table_3_1_0" type="hidden"/></td>
    <td rowspan="2" style="background:#5dc2ee;color:#fff;"><div align="center" id="table_4_1"></div><input id="table_4_1_0" type="hidden"/></td>
    <td rowspan="2" style="background:#92e0aa;color:#fff;"><div align="center" id="table_5_1"></div><input id="table_5_1_0" type="hidden"/></td>
    <td rowspan="2" style="background:#5dc2ee;color:#fff;"><div align="center" id="table_6_1"></div><input id="table_6_1_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_7_1"></div><input id="table_7_1_0" type="hidden"/></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">2</div></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">3</div></td>
    <td rowspan="2" style="background:#efc974;color:#fff;" ><div align="center" id="table_1_2" ></div><input id="table_1_2_0" type="hidden"/></td>
    <td rowspan="2" style="background:#5dc2ee;color:#fff;"><div align="center" id="table_2_2"></div><input id="table_2_2_0" type="hidden"/></td>
    <td rowspan="2" style="background:#92e0aa;color:#fff;"><div align="center" id="table_3_2"></div><input id="table_3_2_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_4_2"></div><input id="table_4_2_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_5_2"></div><input id="table_5_2_0" type="hidden"/></td>
    <td rowspan="2" style="background:#efc974;color:#fff;"><div align="center" id="table_6_2"></div><input id="table_6_2_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_7_2"></div><input id="table_7_2_0" type="hidden"/></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">4</div></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">5</div></td>
    <td rowspan="2"><div align="center" id="table_1_3"></div><input id="table_1_3_0" type="hidden"/></td>
    <td rowspan="2" style="background:#92e0aa;color:#fff;"><div align="center" id="table_2_3"></div><input id="table_2_3_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_3_3"></div><input id="table_3_3_0" type="hidden"/></td>
    <td rowspan="2" style="background:#5dc2ee;color:#fff;"><div align="center" id="table_4_3"></div><input id="table_4_3_0" type="hidden"/></td>
    <td rowspan="2" style="background:#5dc2ee;color:#fff;"><div align="center" id="table_5_3"></div><input id="table_5_3_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_6_3"></div><input id="table_6_3_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_7_3"></div><input id="table_7_3_0" type="hidden"/></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">6</div></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">7</div></td>
    <td rowspan="2" style="background:#5dc2ee;color:#fff;"><div align="center" id="table_1_4"></div><input id="table_1_4_0" type="hidden"/></td>
    <td rowspan="2"  style="background:#efc974;color:#fff;"><div align="center" id="table_2_4"></div><input id="table_2_4_0" type="hidden"/></td>
    <td rowspan="2" style="background:#5dc2ee;color:#fff;"><div align="center" id="table_3_4"></div><input id="table_3_4_0" type="hidden"/></td>
    <td rowspan="2" style="background:#efc974;color:#fff;"><div align="center" id="table_4_4"></div><input id="table_4_4_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_5_4"></div><input id="table_5_4_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_6_4"></div><input id="table_6_4_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_7_4"></div><input id="table_7_4_0" type="hidden"/></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">8</div></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">9</div></td>
    <td rowspan="2"><div align="center" id="table_1_5"></div><input id="table_1_5_0" type="hidden"/></td>
    <td rowspan="2" style="background:#ed9ea1; color:#fff;"><div align="center" id="table_2_5"></div><input id="table_2_5_0" type="hidden"/></td>
    <td rowspan="2" style="background:#ed9ea1; color:#fff;"><div align="center" id="table_3_5"></div><input id="table_3_5_0" type="hidden"/></td>
    <td rowspan="2" style="background:#ed9ea1; color:#fff;"><div align="center" id="table_4_5"></div><input id="table_4_5_0" type="hidden"/></td>
    <td rowspan="2" style="background:#5dc2ee;color:#fff;"><div align="center" id="table_5_5"></div><input id="table_5_5_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_6_5"></div><input id="table_6_5_0" type="hidden"/></td>
    <td rowspan="2" style="background:#ed9ea1; color:#fff;"><div align="center" id="table_7_5"></div><input id="table_7_5_0" type="hidden"/></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">10</div></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">11</div></td>
    <td rowspan="2" style="background:#ed9ea1; color:#fff;"><div align="center" id="table_1_6"></div><input id="table_1_6_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_2_6"></div><input id="table_2_6_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_3_6"></div><input id="table_3_6_0" type="hidden"/></td>
    <td rowspan="2" style="background:#ed9ea1; color:#fff;"><div align="center" id="table_4_6"></div><input id="table_4_6_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_5_6"></div><input id="table_5_6_0" type="hidden"/></td>
    <td rowspan="2"><div align="center" id="table_6_6"></div><input id="table_6_6_0" type="hidden"/></td>
    <td rowspan="2" style="background:#ed9ea1; color:#fff;"><div align="center" id="table_7_6"></div><input id="table_7_6_0" type="hidden"/></td>
  </tr>
  <tr>
    <td style="background:#f7f6f6;"><div align="center">12</div></td>
  </tr>
</table>
<div class="modal drinks fade bs-example-modal-sm " tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
  <div class="modal-dialog modal-sm" role="document">
  <div class="modal-content">
      <div class="modal-header">
              <a class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></a>
              <h4 class="modal-title" id="myModalLabel">课程信息</h4>
      </div>
      <div class="modal-body" id="lei">

      </div>
  </div>
  </div>
</div>
</body>
<script>
    $.ajax({
      url:"/user/kechengbiao",
      type:"get",
      dataType:"json",
      success:function(data){
        //1.清空课程表
        // for(var i=1;i<=7;i++){
        //   for(var j=1;j<=6;j++){
        //     $("#table_"+i+"_"+j).html("");
        //   }
        // }
        //2.渲染课程表
        for(var i=0;i<data.length;i++){

          $("#table_"+data[i].Wek_Day+"_"+data[i].Node_Day).html("<a onclick='showdesc(this)' data-toggle='modal' data-target='.drinks'>"+data[i].Cou_Name+"</a>");
          $("#table_"+data[i].Wek_Day+"_"+data[i].Node_Day+"_0").val("教室:"+data[i].ClsRom_Id+"    "+"教师:"+data[i].Tea_Name);
          
        }
      }
    })

    function showdesc(e){
      var a = e.parentNode.id+"_0";
      var b = $("#"+a).val();
      $(".modal-body").text(b);
      var c = e.parentNode.id;
    }
</script>
</html>
